/*
package com.runfast.waimai.utils.rabbitmq;


import com.alibaba.fastjson.JSONObject;
import com.runfast.waimai.dao.model.RunfastGoodsSellRecord;
import com.runfast.waimai.utils.websocket.DiaoDuWebsocketController;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public  class OrderReceiver {
    @Autowired
    private DiaoDuWebsocketController diaoDuWebsocketController;
    @RabbitListener(queues = "wm_order_manager")
    @RabbitHandler
    public void process(RunfastGoodsSellRecord order) {
        System.out.println("Receiver  : " + JSONObject.toJSONString(order));
        if(diaoDuWebsocketController.webSockets !=null &&diaoDuWebsocketController.webSockets.size()>0){
            diaoDuWebsocketController.broadcast(order, null);
        }
    }
}
*/
